package com.example.demo.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;

import java.sql.Timestamp;

@Getter
@TableName("Orders")
public class Order {
    @TableId(type = IdType.AUTO)
    private Integer order_id;//订单id

    @TableField("order_state")
    private String order_state;//订单状态

    @TableField("product_number")
    private Integer product_number;//商品数量

    @TableField("receiver")
    private String receiver;//收货人

    @TableField("address")
    private String address;//收货地址

    @TableField("product_id")
    private Integer product_id;//商品id

    @TableField("product_name")
    private String product_name;//商品名称

    @TableField("user_id")
    private Integer user_id;//用户id

    @TableField("total_price")
    private float total_price;//总价

    @TableField("order_time")
    private Timestamp order_time;//下单时间

    @TableField("product_img")
    private String product_img;

    @TableField("order_uuid")
    private String order_uuid;

    public Order(Integer order_id, String order_state, Integer product_number, String receiver, String address, Integer product_id, String product_name, Integer user_id, float total_price, Timestamp order_time, String product_img, String order_uuid) {
        this.order_id = order_id;
        this.order_state = order_state;
        this.product_number = product_number;
        this.receiver = receiver;
        this.address = address;
        this.product_id = product_id;
        this.product_name = product_name;
        this.user_id = user_id;
        this.total_price = total_price;
        this.order_time = order_time;
        this.product_img = product_img;
        this.order_uuid = order_uuid;
    }


    public Order() {
    }

    public Order(Integer productId, Integer userId, Integer productNumber) {
        this.product_id = productId;
        this.user_id = userId;
        this.product_number = productNumber;
    }


    public Integer getOrder_id() {
        return order_id;
    }

    public void setOrder_id(Integer order_id) {
        this.order_id = order_id;
    }

    public String getOrder_state() {
        return order_state;
    }

    public void setOrder_state(String order_state) {
        this.order_state = order_state;
    }

    public Integer getProduct_number() {
        return product_number;
    }

    public void setProduct_number(Integer product_number) {
        this.product_number = product_number;
    }

    public String getReceiver() {
        return receiver;
    }

    public void setReceiver(String receiver) {
        this.receiver = receiver;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public Integer getProduct_id() {
        return product_id;
    }

    public void setProduct_id(Integer product_id) {
        this.product_id = product_id;
    }

    public String getProduct_name() {
        return product_name;
    }

    public void setProduct_name(String product_name) {
        this.product_name = product_name;
    }

    public Integer getUser_id() {
        return user_id;
    }

    public void setUser_id(Integer user_id) {
        this.user_id = user_id;
    }

    public float getTotal_price() {
        return total_price;
    }

    public void setTotal_price(float total_price) {
        this.total_price = total_price;
    }

    public Timestamp getOrder_time() {
        return order_time;
    }

    public void setOrder_time(Timestamp order_time) {
        this.order_time = order_time;
    }

    public String getProduct_img() {
        return product_img;
    }

    public void setProduct_img(String product_img) {
        this.product_img = product_img;
    }

    public String getOrder_uuid() {
        return order_uuid;
    }

    public void setOrder_uuid(String order_uuid) {
        this.order_uuid = order_uuid;
    }

    @Override
    public String toString() {
        return "Order{" +
                "order_id=" + order_id +
                ", order_state='" + order_state + '\'' +
                ", product_number=" + product_number +
                ", receiver='" + receiver + '\'' +
                ", address='" + address + '\'' +
                ", product_id=" + product_id +
                ", product_name='" + product_name + '\'' +
                ", user_id=" + user_id +
                ", total_price=" + total_price +
                ", order_time=" + order_time +
                ", product_img='" + product_img + '\'' +
                ", order_uuid='" + order_uuid + '\'' +
                '}';
    }
}
